
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[spOwner_UpdateOwner]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[spOwner_UpdateOwner]
GO

GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Update a Owner
-- =============================================
CREATE PROCEDURE [dbo].[spOwner_InsertOwner]
{
	@OwnerId Int32(4),
	@CompanyName AnsiString(100),
	@Title AnsiString(50),
	@FirstName AnsiString(50),
	@LastName AnsiString(50),
	@Street1 AnsiString(50),
	@Street2 AnsiString(50),
	@Suburb AnsiString(50),
	@State AnsiString(50),
	@Postcode AnsiString(4),
	@Phone AnsiString(10),
	@Mobile AnsiString(10),
	@ABN AnsiString(20),

}
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	UPDATE Owner
	SET
	
		OwnerId = @OwnerId,
		CompanyName = @CompanyName,
		Title = @Title,
		FirstName = @FirstName,
		LastName = @LastName,
		Street1 = @Street1,
		Street2 = @Street2,
		Suburb = @Suburb,
		State = @State,
		Postcode = @Postcode,
		Phone = @Phone,
		Mobile = @Mobile,
		ABN = @ABN,
	WHERE
		OwnerID = @OwnerID    


 

END
GO
